package com.dao;
import java.util.List;
import org.hibernate.HibernateException;
import org.hibernate.Session;


public class DAObusinessImpl implements DAObusiness{

		public List<Business> listSearchBusinessDAO(String businessname,String codesic) {
			Session session = Hibernateutill.getSessionFactory().getCurrentSession();
			session.beginTransaction();
			List<Business> businesses   = null;
			
			businesses = (List<Business>)session.createQuery("from Business where businessName LIKE '%" + businessname + "%' AND codeSIC LIKE '%" + codesic + "%'").list();
			session.getTransaction().commit();
			return businesses;
		}

	}

